<?php 
include 'header.php';
include 'conexaoMysql.php';
$crud = new crud();
$event = $crud->ler('tbEvento');
$orad= $crud->ler('tbOradores');
?>

<body>
<div class="tbl_conteudo">
<div class="topo_lista">
<h3>Cadastro de Sub-Evento</h3>
<div class="clr"></div></div>
<div class="tabela">
    <div id="contactform">
        <form id="form1" action="cursosModel.php?funcao=inserir" method="POST" ><br>
            <fieldset>
                <legend><h2>CADASTRAR NOVO SUB-EVENTO</h2></legend>
				<label for="tm">Tema:</label>
                    <input class="input" type="text" name="tbCursosDescricao" id="tm" required autofocus /></br>
                <label for="D1">Evento:</label>  
					<?php 
							echo "
							<select class=input name=evento required>
								<option selected value=>Selecione Evento!</option>";
						while ($ev = mysql_fetch_array($event)){
							echo "
								<option value=$ev[0]>$ev[1]</option>";
						}
							echo "
							</select>"
					?><br />
				<label for="D2">Orador:</label>  
					<?php 
							echo "
							<select class=input name=orador required>
								<option selected value=>Selecione Orador!</option>";
						while ($ev1 = mysql_fetch_array($orad)){
							echo "
								<option value=$ev1[0]>$ev1[1]</option>";
						 }
							echo "
							</select>"
					?><br /> 
					 
				<label for="tema">Tipo:</label>
					<select class="input" name="tbCursosTipo" required >
						<option value="">Selecione!</option>
						<option value="1">Curso</option>
						<option value="2">Mini-Curso</option>
						<option value="2">Palestra</option>
						<option value="2">Oficina</option>
					</select><br />
				<label for="mdl">Modalidade:</label>
					<select class="input" name="tbCursosModalidade" required>
						<option value="">Selecione!</option>
						<option value="1">Pago</option>
						<option value="2">Gratuito</option>
					</select><br />             
				<label for="dtinicio">Data de Inicio:</label>
					<input type="text" name="tbCursosData" class="inputData" id="datepicker" required /><br />
				<label for="hora">Hora de Inicio:</label>
					<input name="tbCursosHorario" type="text" id="hora"class="inputHora" /><br />
				<label for="temp">Duração:</label>
					<input class="input" type="text" id="temp" name="tbCursosDuracao" /><br />
				<label for="lcl">Local:</label>
					<input class="input" type="text" name="tbCursosLocal" id="lcl" /><br />
				<label for="obj">Objetivos</label>
					<input class="input" type="text" name="tbCursosObjetivos" id="obj" require /><br />
				<label for="vagas">Vagas:</label>
					<input class="input" type="text" name="tbCursosVagas" id="vagas" required/><br />
				<label for="moeda">Valor:</label>
					<input class="dinheiro" type="text" name="tbCursosValor" id="moeda" required /><br />
	
				<button class="button" type="submit" value="Salvar">Salvar</button>
                <input class="button" type="reset" value="Limpar" id="s1">
                <a href="cursos.php" class="button">Voltar</a>
			</fieldset>
	</form>
    </div>
</div>

<?php include 'footer.php';
         include 'mascarasJs.php';
;?>   
    
    